{% extends "base.html" %}

{% block content %}
  <h1>Runners</h1>
  <p>
    Runners are programs managed by Lutris that can run games. Each installation
    script is assigned a runner. Here are the runners currently supported by Lutris:
  </p>
  <ul class="runner-list">
    {% for runner in runners %}
      {% if runner.icon %}
        <li>
          <h2>
            <img src="{{runner.icon_url}}" alt="{{runner.name}}"/>
            {{ runner }}
          </h2>
          <strong>Website:</strong>
          <a href="{{runner.website}}" target="_blank">
            {{runner.website}}
          </a>
          <br>
          <strong>Supported platforms:</strong>
          {% for platform in runner.platforms.all %}
            <a href="{% url 'games_by_platform' platform=platform.pk %}" class="filter-link">{{ platform }}</a>
          {% endfor %}
          <br>
          <p><a href="{% url 'games_by_runner' runner=runner.slug %}">Browse games for all versions</a></p>
          {% if runner.versions %}
            <strong>Versions:</strong>
            <ul>
            {% for version in runner.versions %}
            <a class="filter-link" href="{% url "games_by_runner_version" runner=runner.slug version=version.full_version %}">{{version}}</a>
            {% endfor %}
            </ul>
          {% endif %}
        </li>
      {% endif %}
    {% endfor %}
  </ul>
{% endblock %}
